﻿<%@ include file="/common/taglibs.jsp"%>
<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %>

<title><fmt:message key="departmentDetail.title"/></title>
<content tag="heading"><fmt:message key="departmentDetail.heading"/></content>

  <script language="javascript">
    
         window.parent('treePage').location.href="branchs.html?method=branchDeptTree";   
      
  </script>

<table width="100%" height="76" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="left" valign="top" >
	  
           <c:if test="${param.from == 'tree' }">
	  
			<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
			  <tr>
				<td height="25" bgcolor="#5F9CD4" class="font01">&nbsp;&nbsp;&nbsp;&nbsp;系统&gt;&gt; 机构部门&gt;&gt;部门信息</td>
			  </tr>
			  <tr>
				<td height="8"></td>
			  </tr>
			</table>
		  </c:if>	  
         
          <html:form action="saveDepartment" method="post" styleId="departmentForm" onsubmit="return validateDepartmentForm(this)">
            <html:hidden property="deptId"/>
			  
			  <!--- BEGIN--->
			  <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CDCDCD">
				<tr>
				  <td height="27" background="img/m-bt-bg01.gif" bgcolor="#FFFFFF" style="background-repeat:no-repeat;background-position:right">
						<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
							  <td width="2%"><img src="img/dian-1.gif" width="6" height="6" /></td>
							  <td width="48%" class="btn02">部门信息</td>
							  <td width="50%">&nbsp;</td>
							</tr>
				    </table>
				  </td>
				</tr>
				<tr>
				  <td bgcolor="#F8F8F8">
					    <table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolor="ffffff" bordercolordark="#ffffff" bordercolorlight="B9B9B9">
							<tr align="center">
							  <td width="133" height="28" bgcolor="#EFEFEF"> <carsite:label styleClass="desc" key="departmentForm.deptName"/></td>
							  <td width="310" height="28">
						     
								        <html:errors property="deptName"/>
								        <html:text property="deptName" styleId="deptName" styleClass="text medium"/>
        
							  </td>
							   <td width="156" height="28"bgcolor="#EFEFEF">  <carsite:label styleClass="desc" key="departmentForm.telNo"/></td>
							  <td width="625" height="28">
							        <html:errors property="telNo"/>
							        <html:text property="telNo" styleId="telNo" styleClass="text medium"/>
                              </td>
							</tr>
						     <tr align="center">
                              <td height="28"bgcolor="#EFEFEF">  <carsite:label styleClass="desc" key="departmentForm.principal"/></td>
                              <td height="28">
                                     <html:errors property="principal"/>
                                     <html:text property="principal" styleId="principal" styleClass="text medium"/>
                              </td>
                              <td height="28"bgcolor="#EFEFEF">是否仓库</td>
                              <td height="28">
                             <html:radio property="isWarehouse" value="true">是</html:radio>
                             <html:radio property="isWarehouse" value="false">否</html:radio>
                              </td>
                    
						  </tr>
					
       
        
							<tr align="center">
							  <td height="28"bgcolor="#EFEFEF">  <carsite:label styleClass="desc" key="departmentForm.branch"/></td>
							  <td height="28">
							  
							        <html:text property="branchName" styleClass="inputstyle" onclick="javascript:onShow(this,'branchId','branchDiv')" size="27" maxlength="27"/>
							    	<html:hidden property="branchId"/>
									<jsp:include page="branchDiv.jsp">
										  <jsp:param name="isParent" value="false" />
									</jsp:include>
							
							  </td>
							  <td height="28"bgcolor="#EFEFEF"></td>
							  <td height="28">
							
        
							  </td>
							</tr>
					</table>			  
						<table  width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="ffffff" bordercolorlight="B9B9B9" bordercolordark="#ffffff">
						  <tr bgcolor="#99CCCC" >
							<td width="25%" height="28" align="center"  bgcolor="#EFEFEF">&nbsp; </td>
							<td width="34%" height="28" align="center" nowrap  bgcolor="#EFEFEF">
							  	                        
									<html:submit  property="method.save" onclick="bCancel=false">
							            <fmt:message key="button.save"/>
							        </html:submit>
		
        
				                    <c:if test="${param.from != 'tree' }">
		                                   <c:if test="${departmentForm.deptId != null}" >
													 
										        <html:submit styleClass="inputstyle" property="method.delete" onclick="bCancel=true; return confirmDelete('Department')">
										            <fmt:message key="button.delete"/>
										        </html:submit>
										        
										     </c:if>
					
		                              </c:if>
								    
                           
						          </td> 
							<td width="41%" height="28"   bgcolor="#EFEFEF" >&nbsp;</td>
						  </tr>
					</table>
				  
				  </td>
				</tr>
			  </table>
			  
			 <!---END--->
	  
	  
              </html:form>
			  <table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td>&nbsp;</td>
				</tr>
			  </table>
      
    
	</td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="5"></td>
  </tr>
</table>


<script type="text/javascript">
    Form.focusFirstElement($("departmentForm"));
</script>

<html:javascript formName="departmentForm" cdata="false" dynamicJavascript="true" staticJavascript="false"/>
<script type="text/javascript" src="<html:rewrite page="/scripts/validator.jsp"/>"></script>
